package com.qj.yantaishan.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.qj.yantaishan.mapper.OrderPeerpayMapper;
import com.qj.yantaishan.domain.OrderPeerpay;
import com.qj.yantaishan.service.IOrderPeerpayService;
import com.qj.yantaishan.common.core.text.Convert;

/**
 * 代付Service业务层处理
 * 
 * @author qihe
 * @date 2022-07-22
 */
@Service
@Primary
public class OrderPeerpayServiceImpl    extends ServiceImpl<OrderPeerpayMapper, OrderPeerpay>  implements IOrderPeerpayService
{
    @Autowired
    private OrderPeerpayMapper orderPeerpayMapper;

    /**
     * 查询代付
     * 
     * @param id 代付主键
     * @return 代付
     */
    @Override
    public OrderPeerpay selectOrderPeerpayById(Long id)
    {
        return orderPeerpayMapper.selectOrderPeerpayById(id);
    }

    /**
     * 查询代付列表
     * 
     * @param orderPeerpay 代付
     * @return 代付
     */
    @Override
    public List<OrderPeerpay> selectOrderPeerpayList(OrderPeerpay orderPeerpay)
    {
        return orderPeerpayMapper.selectOrderPeerpayList(orderPeerpay);
    }

    /**
     * 新增代付
     * 
     * @param orderPeerpay 代付
     * @return 结果
     */
    @Override
    public int insertOrderPeerpay(OrderPeerpay orderPeerpay)
    {
        return orderPeerpayMapper.insertOrderPeerpay(orderPeerpay);
    }

    /**
     * 修改代付
     * 
     * @param orderPeerpay 代付
     * @return 结果
     */
    @Override
    public int updateOrderPeerpay(OrderPeerpay orderPeerpay)
    {
        return orderPeerpayMapper.updateOrderPeerpay(orderPeerpay);
    }

    /**
     * 批量删除代付
     * 
     * @param ids 需要删除的代付主键
     * @return 结果
     */
    @Override
    public int deleteOrderPeerpayByIds(String ids)
    {
        return orderPeerpayMapper.deleteOrderPeerpayByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除代付信息
     * 
     * @param id 代付主键
     * @return 结果
     */
    @Override
    public int deleteOrderPeerpayById(Long id)
    {
        return orderPeerpayMapper.deleteOrderPeerpayById(id);
    }
}
